package com.yuanchu.gateway.client;

import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @version: 1.0
 * @Author: adan
 * @description:
 * @date: 2024-01-18 16:25
 */
@Slf4j
@Component
public class FeignAuthServiceClientFallbackFactory implements FallbackFactory<FeignAuthClient> {


    @Override
    public FeignAuthClient create(Throwable throwable) {
        throwable.printStackTrace();

        log.debug("调用授权服务发生熔断走降级方法,熔断异常:", throwable.getMessage());
        return null;
    }
}
